package com.eunion.web.cms.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.eunion.web.cms.entity.GaoKaoNews;
import com.eunion.web.common.base.BaseRepository;

@Repository
public interface GaoKaoNewsRepository extends BaseRepository<GaoKaoNews, Long> {

    // 查询最新的rank值。
    @Query(value = "SELECT MIN(rank) AS rank FROM gao_kao_news", nativeQuery = true)
    Integer getMinRank();

}
